score={"张三":{"数学":98,"语文":89,"物理":79},
       "李四":{"化学":86,"语文":97,"数学":69},
       "王五":{"化学":89,"语文":69,"数学":89}}

m_c_s = -1
t_s = None
for student, subjects in score.items():
    if "语文" in subjects and subjects["语文"] > m_c_s:
        m_c_s = subjects["语文"]
        t_s = student
print(f"语文成绩最高的学生是：{t_s}，成绩为：{m_c_s}")

total_scores = {}
for student, subjects in score.items():
    total_scores[student] = sum(subjects.values())
print("每个人的总分：")
for student, total in total_scores.items():
    print(f"{student}: {total}")

sorted_students = sorted(total_scores.items(), key=lambda x: x[1], reverse=True)
print("每个人的分数排名：")
for rank, (student, total) in enumerate(sorted_students, start=1):
    print(f"第 {rank} 名：{student}，总分：{total}")